package edu.hawaii.halealohacli;

import java.util.Hashtable;

/**
 * A storage class for a Hashtable that can be passed to command without allowing direct access.
 * 
 * @author Jordan Do
 * @author Chris Fang
 * 
 */
public class Baselist {
  private Hashtable<String, double[]> baseList = new Hashtable<String, double[]>();

  /**
   * Putter for the hashtable.
   * 
   * @param name String key
   * @param array double[] value
   */
  public void put(String name, double[] array) {
    baseList.put(name, array);
  }
  
  /**
   * Return true if the hashtable contains the object.
   * 
   * @param name String name
   * @return found true if the hashtable contains the object
   */
  public boolean contains(String name) {
    return baseList.containsKey(name);
  }

  /**
   * Getter for the hashtable.
   * 
   * @param name String key
   * @return double[] value
   */
  public double[] get(String name) {
    return baseList.get(name);
  }

  /**
   * Remover for the hashtable.
   * 
   * @param name String key
   */
  public void remove(String name) {
    baseList.remove(name);
  }
}
